package com.byedu.model.constants;

/**
 * Created by jason on 2017/6/4.
 */
public enum SubOptionType {
    A(0, "A"),
    B(1, "B"),
    C(2, "C"),
    D(3, "D"),
    E(4, "E"),
    F(5, "F"),
    G(6, "G"),
    H(7, "H"),
    RIGHT(2123, "对"),
    WRONG(2124, "错");
    private Integer key;
    private String value;

    private SubOptionType(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getValue(Integer key) {
        for (SubOptionType fileType : SubOptionType.values()) {
            if (fileType.getKey() == key) {
                return fileType.getValue();
            }
        }

        return null;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.key + "_" + this.value;
    }

}
